fix: resolve KeyError when text_key is missing in documents #816 - #820
Closed
suhaniiz wants to merge 531 commits into
Closed
fix: resolve KeyError when text_key is missing in documents #816#820suhaniiz wants to merge 531 commits into
suhaniiz wants to merge 531 commits into
Conversation
Add SQLite to Supabase migration utility
feat(rag): Refactor LLM agent to use dynamic per-user tokens
fix(db): Update UUID generation for Postgres compatibility
…hooks-issue58 devops: add pre-commit hooks for black, flake8, and prettier (param20h#58)
…ue56 test: add snapshot tests for key frontend components (param20h#56)
…n-Input fix(01): HuggingFaceTokenModal - apply code review fixes
feat(ui): Multiple Chat Sessions Sidebar (param20h#115)
feat: add table-aware PDF chunking with pdfplumber
…dge-graph feat: add GraphRAG knowledge graph context
Updated retriever.py to use langchain_classic.retrievers for EnsembleRetriever, which is required in the latest versions. Added langchain-classic to requirements.txt.
Add source confidence badges
Adjusted test_retriever.py to expect the new stable sort order and rank-based scores (1.0) introduced by the hybrid search integration.
…tests 1. Updated retriever.py import to use langchain_classic and fixed typos. 2. Fixed TypeErrors in test_graphrag_agent.py mocks. 3. Fixed ObjectDeletedError in test_documents.py. 4. Updated test_retriever.py assertions to match rank-based scoring.
…to-text-dictation feat(ui): Implement Speech-to-Text Dictation
…-search feat(rag): Hybrid Search (Keyword + Vector)
…ator-tool feat(rag): implement secure calculator tool for financial math (Fixes…
Co-authored-by: Kishor Kumar <ckishor2333@gmail.com>
…ntegration-tests test: add API integration tests using httpx and pytest
…-chunks fix: remove stale vector chunks before re-ingestion in ChromaDB
…age-timestamps Add relative timestamps to chat message bubbles
…ownload-route fix: sanitize filename in /download route to prevent path traversal
feat(ui): add settings page with HF token status and manual token input
…est-components-52 test: set up frontend component tests
Co-authored-by: ack-chai <abhijna.marathe@gmail.com>
…parately feat(db): embed markdown tables as separate chunks in ChromaDB
…ess-reset fix: reset upload zone after successful processing
…reranker added semantic reranker for search results
…k-mismatch docs: rewrite README to match actual Flask + Pinecone + Jinja2 stack
…counter Add live character counter and warning for chat input
…idation-18 fix: handle RequestValidationError globally to return 422 instead of …
…fications-25 Feat/toast notifications 25
|
@suhaniiz is attempting to deploy a commit to the param20h's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Author
|
@param20h ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 PR Checklist
🔗 Related Issue
Closes #816
📝 What does this PR do?
This PR addresses a runtime crash vulnerability inside
Reranker.rerank()(app/reranker.py):doc[text_key]) with a safe dictionary retrieval method (doc.get(text_key, "")).KeyErrorthat crashes the active request.🗂️ Type of Change
🧪 How was this tested?
uvicorn app.main:app --reload)npm run devinsidefrontend/)📸 Screenshots (if UI change)
Using
.get(text_key, "")allows the cross-encoder model to continue scoring other valid document elements smoothly within the batch array without throwing critical thread faults.✅ Self-Review Checklist
dev, notmainmainbranch or any HuggingFace deployment config